package com.cloudcc.mobile.util;

import com.easemob.chat.EMGroup;

import java.util.Comparator;

/**
 * Created by xhsdele on 2017/8/2 0002.
 */

public class GroupComParator implements Comparator<EMGroup> {
    @Override
    public int compare(EMGroup lhs, EMGroup rhs) {
        String str1 = PinyinUtils.cn2FirstSpell((rhs.getGroupName()));
        String str2 = PinyinUtils.cn2FirstSpell((lhs.getGroupName()));
        return str2.compareTo(str1);
    }
}